﻿@model iChip.Hotspots.Models.HotspotsModel
@{
    if (ViewBag.State == 1)
    {
        ViewBag.Title = "Cập nhật Hotspots";
    }
    else
    {
        ViewBag.Title = "Thêm mới Hotspots";
    }
    Layout = null;
}

@using (Html.BeginForm("AddHotspots", "AdminHotspots", FormMethod.Post, new { id = "formaddHotspots" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary()
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
        <h4 class="modal-title">@ViewBag.Title</h4>
    </div>
    <div class="modal-body">
        <div class="row">
            <div class="col-md-12">
                <p>@Html.TextBoxFor(m => m.Hotspot_Mac, new { @class = "col-md-12 form-control", @placeholder = "Mac" })</p>
                <p>@Html.TextBoxFor(m => m.Hotspot_Name, new { @class = "col-md-12 form-control", @placeholder = "Name" })</p>
                <p>@Html.TextBoxFor(m => m.Hotspot_Ip, new { @class = "col-md-12 form-control", @placeholder = "Ip" })</p>
                <p>@Html.TextBoxFor(m => m.Hotspot_Nasid, new { @class = "col-md-12 form-control", @placeholder = "Nasid" })</p>
                <p>@Html.TextBoxFor(m => m.Hotspot_Region, new { @class = "col-md-12 form-control", @placeholder = "Region" })</p>
                <p>@Html.TextBoxFor(m => m.Hotspot_City, new { @class = "col-md-12 form-control", @placeholder = "City" })</p>
                <p>@Html.TextBoxFor(m => m.Hotspot_Location, new { @class = "col-md-12 form-control", @placeholder = "Location" })</p>
                <p>@Html.TextBoxFor(m => m.Hotspot_Address, new { @class = "col-md-12 form-control", @placeholder = "Address" })</p>
                <p>@Html.TextBoxFor(m => m.Hotspot_Type, new { @class = "col-md-12 form-control", @placeholder = "Type" })</p>
                <p>@Html.CheckBoxFor(m => m.Hotspot_Status, new { @class = "col-md-12 form-control" }) Status</p>
                <p><label id="lblNote"></label></p>
                @Html.TextBoxFor(m => m.Hotspot_Id, new { placeholder = "", @class = "form-control hidden", @readonly = true })
            </div>
        </div>
        @*<a class="btn green" data-toggle="modal" href="#stack2">Launch modal</a>*@
    </div>
    <div class="modal-footer">
        <button type="button" data-dismiss="modal" class="btn">Đóng</button>
        @if (ViewBag.State == 1)
        {
            <button type="button" class="btn green" id="btEditHotspot">Cập nhật</button>
        }
        else
        {
            <button type="button" class="btn green" id="btAddHotspot">Thêm mới</button>
        }

    </div>
}

